package main

import "fmt"

func main() {
	// months := []string{"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
	// fmt.Println(cap(months))
	// fmt.Println(len(months))
	// fmt.Println(months)

	// quarter1 := months[0:3]
	// quarter2 := months[3:6]
	// quarter3 := months[6:9]
	// quarter4 := months[9:12]

	// fmt.Println(len(quarter1), cap(quarter1))
	// fmt.Println(len(quarter2), cap(quarter2))
	// fmt.Println(quarter2[2])
	// fmt.Println(len(quarter3), cap(quarter3))
	// fmt.Println(len(quarter4), cap(quarter4))

	// fmt.Println(`--------------------------------------`)

	// quarter2Extended := quarter2[:4]
	// fmt.Println(quarter2Extended[3])
	// fmt.Println(len(quarter2Extended))
	// fmt.Println(cap(quarter2Extended))

	// var numbers []int
	// for i := 0; i < 10; i++ {
	// 	numbers = append(numbers, i)
	// 	fmt.Printf("%d\tcap=%d\t%v\n", i, cap(numbers), numbers)
	// }

	// var numbers []int
	// for i := 0; i < 10; i++ {
	// 	numbers = append(numbers, i)
	// 	fmt.Printf("%d\tcap=%d\t%v\n", i, cap(numbers), numbers)
	// }

	letters := []string{"A", "B", "C", "D", "E"}
	remove := 2
	fmt.Println("Before:", letters)
	letters[remove] = letters[len(letters)-1]
	fmt.Println(letters[remove])
	letters = letters[:len(letters)-1]
	fmt.Println("after：", letters)

	fmt.Println("===============================")
	slice2 := make([]string, 3)
	copy(slice2, letters[1:4])

}
